package com.size.mall.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.size.mall.mallapi.entity.PmsProductSaleAttr;
import com.size.mall.mallapi.service.PmsProductSaleAttrService;
import com.size.mall.mapper.PmsProductSaleAttrMapper;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;

@Service
public class PmsProductSaleAttrServiceImpl extends ServiceImpl<PmsProductSaleAttrMapper, PmsProductSaleAttr> implements
        PmsProductSaleAttrService {


    @Cacheable(value = {"saleAttr"}, unless = "#result==null")
    @Override
    public List<PmsProductSaleAttr> getPmsProductSaleAttr(String spuId, String skuId) {

        return (List<PmsProductSaleAttr>) baseMapper.getPmsProductSaleAttr_yyy(spuId, skuId);
    }
}
